package com.qingke.OMS.Command;

import java.util.HashMap;
import java.util.Map;

import com.qingke.OMS.Command.Imp.ChooseAdmin;
import com.qingke.OMS.Command.Imp.ChooseUser;
import com.qingke.OMS.Unit.LauncherEnum;

public class SystemCommand extends AbstractCommandFactory {

	protected static Map<LauncherEnum,Command> systemMap = new HashMap<LauncherEnum,Command>();
	static{
		systemMap.put(LauncherEnum.ADMIN, new ChooseAdmin());
		systemMap.put(LauncherEnum.USER, new ChooseUser());
		systemMap.put(LauncherEnum.EXIT, new ExitCommand());
	}

	public Command build(LauncherEnum cmd){
		Command command = systemMap.get(cmd);
		return command;
	}
}
